package classes
{
	import mx.collections.ArrayCollection;
	
	[Bindable] public class Galleries
	{
		
		public var galleries:ArrayCollection;
		public var selected:int;
		public var is_enabled:Boolean;
		
		private var gallery:Gallery;

		public function Galleries(data:Object=null)
		{
			galleries = new ArrayCollection();
			if (data != null)
			{
				set_properties(data);
			}
		}
		
		public function set_properties(data:Object):void
		{
			this.selected = 0;
			this.is_enabled = true;
			
			if(data != null){
				for (var i:int=0; i < data.length(); i++)
				{
					gallery = new Gallery(data[i]);
					galleries.addItem(gallery);
				}
			}
		}
	}
}